<template>
	<view class="home">
		<view style="color: #AAAAAA;padding-top: 10px;padding-bottom: 10px;">费用</view>
		
		<view  style="background-color: #fff;height: 150px;">
			<view  style="display: flex;padiing-top: 20px;height: 40px;background-color: #fff;padding-left: 20px;padding-top: 15px;">
				<view  style="width: 80%;color: #A6A6A6;"> <text style="color: #3A3A3A;">{{hn_set.hn_title}}</text></view>
				<view > <text style="color: #E43D33;">￥{{hn_set.op}}</text></view>
			</view>
			<hr style="height:1px;border:none;border-top:1px dashed #DADCE0;width: 90%;margin: 10px auto;">
			<view>
				<button type="default" @click="btn()"  style="width: 90%;background-color: #F14399;color: #fff;">微信支付</button>
			</view>
		
		</view>
		<view class="" style="background-color: #fff;height: 500px;">
		<view style="color: #AAAAAA;padding-top: 10px;padding-bottom: 10px;">说明</view>

		<view style="display: flex;height: 80px;background-color: #fff;">
			<view class="iconfont icon-kefu" style="margin-top: 18px; margin-left:10px;font-size:20px;color: #F14399;"></view>
			<view style="margin-top: 15px; margin-left:10px;"><text style="font-size: 14px;color: #AAAAAA;">安排一名专属红娘，为你精准匹配另一半，搭建专属爱的小群，全程陪伴式服务</text></view>	
		</view>
		
		<hr style="height:1px;border:none;border-top:1px dashed #DADCE0;width: 90%;margin: 10px auto;">
		
		<view style="height: 200px;background-color: #fff;text-align: center;">
			<view class="" style="margin-top: 27px;border-radius: 10px;margin: 0px auto;">
				<image :src="hn_set.picc" mode="" style="width: 160px;height: 160px;"></image>
			</view>
			<view style="margin-top: 15px; margin-left:10px;"><text style="font-size: 14px;color:#AAAAAA;">客服信息 想脱单，添加红娘微信：{{hn_set.hn_text}}</text></view>
		</view>
		
		<hr style="height:1px;border:none;border-top:1px dashed #DADCE0;width: 90%;margin: 10px auto;">
		
		<view style="display: flex;height: 80px;background-color: #fff;font-size: 12px;color: #AAAAAA;">
		    <text style="margin-left: 10px;: #A6A6A6;">{{hn_set.xq}}</text>
		</view>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {

				hn_set:"",
			}
		},
		onLoad(options) {
			this.id = options.id
			this.get_hn_prc()
		},
		methods: {
			
			async get_hn_prc(){
				
				const res = await this.$myRuquest({
					url: '/index/dsnv.activities/get_hn_prc'
				})
				
				console.log(res.data.data);
				
				this.hn_set=res.data.data;
			},
			weixin(){
				window.location.href = "http://ds.kzjpht.com/index/Jsapi/ds_index?uid=" +this.id
			},
			
			//点击报名
			async btn(){
				//查看是否登录
				
				var dd=this.checkGuide()
				
				if(dd !== 1){
					
					const launchFlag = uni.getStorageSync('my_info');
					
					const res= await this.$myRuquest({
						url: '/index/dsnv.uhuodong/preCreate?pid='+this.id+"&uid="+launchFlag.id
					})
					
					if(res.data.code==200){
						
						if (res.data.response['result_msg'] == "SUCCESS") {
							window.location.href = res.data.response['qr_code'];
						}else{
							uni.showToast({
								title:res.data.info,
								duration: 2000,
								icon: 'none'
							})
						}
						
					}else{
						uni.showToast({
							title:res.data.info,
							duration: 2000,
							icon: 'none'
						})
					}
				}
				
			},
		}
	}
</script>

<style>
	
	.home{
		background-color: #F2F2F2;
		padding: 0px 10px;
		height: 800px;
	}

</style>
